package com.gict.antifraudback.exception.assertion;


import com.gict.antifraudback.enums.IResponseEnum;
import com.gict.antifraudback.exception.BusinessException;
import com.gict.antifraudback.exception.MyException;
import java.text.MessageFormat;

public interface BusinessExceptionAssert extends IResponseEnum, CustomerAssert {
    @Override
    default MyException newException(Object... args) {
        String msg = MessageFormat.format(this.getMsg(), args);
        return new BusinessException(this, args, msg);
    }

    @Override
    default MyException newException(Throwable t, Object... args) {
        String msg = MessageFormat.format(this.getMsg(), args);
        return new BusinessException(this, args, msg, t);
    }
}
